import { apiAddFavoriteGoods, apiDeleteFavoriteGoods, apiFootPrintList } from 'js/api'

export default {
  state: {
    
  },
  getters: {
    
  },
  actions: {
    // 收藏商品
    fetchCollectGoods({state}, payload) {
      apiAddFavoriteGoods(payload.goodsList).then(data => {
        payload.callback && payload.callback((data || {}).deleteStatus)
      })
    },
    // 收藏商品
    deleteCollectGoods({state}, payload) {
      apiDeleteFavoriteGoods(payload.goodsList).then(data => {
        payload.callback && payload.callback((data || {}).deleteStatus)
      })
    },
    // 猜你喜欢
    findFootPrint({state}, payload) {
      apiFootPrintList(payload.token).then(data => {
        payload.callback && payload.callback((data || {}))
      })
    }
  },
  mutations: {
    
  }
}
